
INLINE int Map::GetWidth() const
{
	return m_iWidth * CX_TILE;
}

INLINE int Map::GetHeight() const
{
	return m_iHeight * CY_TILE;
}

INLINE int Map::GetXCount() const
{
	return m_iWidth;
}

INLINE int Map::GetYCount() const
{
	return m_iHeight;
}

INLINE Map::Tile& Map::GetTile(int x, int y)
{
	assert(0 <= x && x < m_iWidth);
	assert(0 <= y && y < m_iHeight);

	return m_pTiles[y * m_iWidth + x];
}

INLINE Map::Tile const& Map::GetTile(int x, int y) const
{
	assert(0 <= x && x < m_iWidth);
	assert(0 <= y && y < m_iHeight);

	return m_pTiles[y * m_iWidth + x];
}

INLINE char const *Map::GetName() const
{
	return m_sName;
}

INLINE bool Map::IsBlocked(int x, int y) const
{
	if (x < 0 || m_iWidth  <= x) return true;
	if (y < 0 || m_iHeight <= y) return true;
	return m_pTiles[y * m_iWidth + x].bBlocked;
}